<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs for page cache.php</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="file-name">/_inc/function/cache.php</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
															<a href="#sec-functions">Functions</a>
			</div>
	<div class="info-box-body">	
		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Cache Functions, Furasta.Org</p>
<p class="description"><p>This file contains all of the functions used in the caching process.</p></p>
	<ul class="tags">
				<li><span class="field">author:</span> Conor Mac Aoidh &lt;<a href="mailto:conormacaoidh@gmail.com">conormacaoidh@gmail.com</a>&gt;</li>
				<li><span class="field">version:</span> 1.0</li>
				<li><span class="field">license:</span> <a href="http://furasta.org/licence.txt">The BSD License</a></li>
			</ul>
		
			</div>
</div>
		

	
	
	
	<a name="sec-functions"></a>	
	<div class="info-box">
		<div class="info-box-title">Functions</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<span class="disabled">Functions</span>
		</div>
		<div class="info-box-body">	
			<a name="functioncache" id="functioncache"><!-- --></a>
<div class="oddrow">
	
	<div>
		<span class="method-title">cache</span> (line <span class="line-number">26</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">cache</p>
<p class="description"><p>Used to make a cache of data that could be  hardware intensive, for re-usage later</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			cache
		</span>
					(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$name</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$content</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$dir</span> = <span class="var-default">&#039;&#039;</span>])
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$name</span><span class="var-description">: of cache file</span>			</li>
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$content</span><span class="var-description">: to be cached</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$dir</span><span class="var-description">: of containing cache file, if applicable</span>			</li>
				</ul>
		
	
</div>
<a name="functioncache_clear" id="functioncache_clear"><!-- --></a>
<div class="evenrow">
	
	<div>
		<span class="method-title">cache_clear</span> (line <span class="line-number">92</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">cache_clear</p>
<p class="description"><p>Used to clear the cache. If no $dir is specified all  cache will be cleared.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			cache_clear
		</span>
					([<span class="var-type">string</span>&nbsp;<span class="var-name">$dir</span> = <span class="var-default">&#039;&#039;</span>])
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$dir</span><span class="var-description">: to be removed, if applicable</span>			</li>
				</ul>
		
	
</div>
<a name="functioncache_clear_image" id="functioncache_clear_image"><!-- --></a>
<div class="oddrow">
	
	<div>
		<span class="method-title">cache_clear_image</span> (line <span class="line-number">280</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">cache_clear_image</p>
<p class="description"><p>destroys all caches of a single image</p></p>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			cache_clear_image
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$path</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$path</span>			</li>
				</ul>
		
	
</div>
<a name="functioncache_css" id="functioncache_css"><!-- --></a>
<div class="evenrow">
	
	<div>
		<span class="method-title">cache_css</span> (line <span class="line-number">148</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">cache_css</p>
<p class="description"><p>caches input css file name or string of css</p></p>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			cache_css
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$file</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$name</span><span class="var-description">: of cache file</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$file</span><span class="var-description">: location of file to cache/string to cache</span>			</li>
				</ul>
		
	
</div>
<a name="functioncache_exists" id="functioncache_exists"><!-- --></a>
<div class="oddrow">
	
	<div>
		<span class="method-title">cache_exists</span> (line <span class="line-number">131</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">cache_exists</p>
<p class="description"><p>If you are entirely confident that your cache file  should never expire you can use this file to see if  the cache exists, otherwise you should use the  cache_is_good function, which allows a time period  before the file becomes invalid.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			cache_exists
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$file</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$dir</span> = <span class="var-default">&#039;&#039;</span>])
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$file</span><span class="var-description">: to check if exists</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$dir</span><span class="var-description">: optional dir containing file</span>			</li>
				</ul>
		
	
</div>
<a name="functioncache_exists_image" id="functioncache_exists_image"><!-- --></a>
<div class="evenrow">
	
	<div>
		<span class="method-title">cache_exists_image</span> (line <span class="line-number">293</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">cache_exists_image</p>
<p class="description"><p>checks if an image cache exists</p></p>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			cache_exists_image
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$path</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$name</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$path</span>			</li>
				</ul>
		
	
</div>
<a name="functioncache_get" id="functioncache_get"><!-- --></a>
<div class="oddrow">
	
	<div>
		<span class="method-title">cache_get</span> (line <span class="line-number">48</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">cache_get</p>
<p class="description"><p>Used to retrieve cached information</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			cache_get
		</span>
					(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$name</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$dir</span> = <span class="var-default">&#039;&#039;</span>])
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$name</span><span class="var-description">: of cache file</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$dir</span><span class="var-description">: of containing cache file, if applicable</span>			</li>
				</ul>
		
	
</div>
<a name="functioncache_get_image" id="functioncache_get_image"><!-- --></a>
<div class="evenrow">
	
	<div>
		<span class="method-title">cache_get_image</span> (line <span class="line-number">267</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">cache_get_image</p>
<p class="description"><p>Used to retrieve cached images</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			cache_get_image
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$path</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$name</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$path</span>			</li>
				</ul>
		
	
</div>
<a name="functioncache_image" id="functioncache_image"><!-- --></a>
<div class="oddrow">
	
	<div>
		<span class="method-title">cache_image</span> (line <span class="line-number">247</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">cache_image</p>
<p class="description"><p>Used to make a cache of an image that could be  hardware intensive to re-render, for usage later</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			cache_image
		</span>
					(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$name</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$image</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$path</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$name</span><span class="var-description">: of cache file</span>			</li>
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$image</span><span class="var-description">: to be cached</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$path</span>			</li>
				</ul>
		
	
</div>
<a name="functioncache_is_good" id="functioncache_is_good"><!-- --></a>
<div class="evenrow">
	
	<div>
		<span class="method-title">cache_is_good</span> (line <span class="line-number">67</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">cache_is_good</p>
<p class="description"><p>Used to check validity of a cache file</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			cache_is_good
		</span>
					(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$name</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$length</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$dir</span> = <span class="var-default">&#039;&#039;</span>])
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$name</span><span class="var-description">: of cache file</span>			</li>
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$length</span><span class="var-description">: of time elapsed before file should be regenerated</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$dir</span><span class="var-description">: of containing cache file, if applicable</span>			</li>
				</ul>
		
	
</div>
<a name="functioncache_js" id="functioncache_js"><!-- --></a>
<div class="oddrow">
	
	<div>
		<span class="method-title">cache_js</span> (line <span class="line-number">209</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">cache_js</p>
<p class="description"><p>caches the given javascript file/string and returns  a url to access the cached file/string</p></p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			cache_js
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$file</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$name</span><span class="var-description">: of the cache file</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$file</span><span class="var-description">: to be cached/string to be cached</span>			</li>
				</ul>
		
	
</div>
		</div>
	</div>
	
	<p class="notes" id="credit">
		Documentation generated on Thu, 07 Jun 2012 18:22:45 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.4</a>
	</p>
	</div></body>
</html>